<!-- 角色管理 -->
<template>
	<div class="bg-ff commonality">
		<el-row :gutter="10">
			<el-col :sm="24" :xs="24">
				<role @roleClick="roleClick" ref="role"></role>
			</el-col>
			<!-- <el-col :sm="6" :xs="24">
        <menus @menuClick="menuClick" ref="menu"></menus>
			</el-col>-->
			<!-- <el-col :sm="8" :xs="24">
        <permission :type="1" ref="routingPermission"></permission>
        <permission :type="2" ref="buttonPermission"></permission>
			</el-col>-->
		</el-row>
	</div>
</template>

<script>
import Role from './components/Role'
// import Menus from './components/Menu'
// import Permission from './components/Permission'

export default {
  name: 'index',
  components: {
    // Permission,
    Role
    // Menus
  },
  data() {
    return {
      role: undefined,
      menu: undefined
    }
  },
  methods: {
    roleClick(role) {
      this.role = role
      this.$refs.menu.roleClick(role)
      this.$refs.routingPermission.menuClick(this.menu, this.role)
      this.$refs.buttonPermission.menuClick(this.menu, this.role)
    },
    menuClick(menu) {
      // if (!this.role) {
      //   this.$message.warning('请选择角色')
      //   return
      // }
      // this.menu = menu
      // this.$refs.routingPermission.menuClick(menu, this.role)
      // this.$refs.buttonPermission.menuClick(menu, this.role)
    }
  }
}
</script>
